import React from "react";
import { useRoutes, BrowserRouter } from "react-router-dom";
import { RoutesList } from "./router";
//路由守卫
import WithRouter from "./components/Hoc/WithRouter";

const App = () => {
  const El = () => useRoutes(RoutesList);
  return (
    <BrowserRouter>
      {/* 使用路由守卫 */}
      <WithRouter>
        <El />
      </WithRouter>
    </BrowserRouter>
  );
};

export default App;
